package old_engine;

import java.awt.Image;
import java.net.URL;
import java.util.Random;

public class Platform {


	private int velocity=3;
	private Game game;
	private int x;
	private int xLength;
	private int y;
	private int yLength = 10;
	private Image platformWood;
	private URL base;
	
	public Platform(Game game){
		platformWood = game.getImage(game.getBase(), "data/platform_wood.png");
		this.game = game;
		create();
	}
	
	public void update(){
		y += (int)game.getGameSpeed();
	}
	
	public void create(){
		Random randomGenerator = new Random();
		x = randomGenerator.nextInt(game.getWidth()-60);
		xLength = randomGenerator.nextInt(40)+30;
		y=0;
	}

	public int getX() {
		return x;
	}

	public int getxLength() {
		return xLength;
	}

	public int getY() {
		return y;
	}

	public int getyLength() {
		return yLength;
	}

	
	public Image getImage(){
		return platformWood;
	}
	
	
}
